<template>
	<view class="content">
		<view class="drop" v-show="clickShow">
			<view class="shape"></view>
			<view class="dropItem">
				<image src="../../static/tabimg/mima.png" class="imgCode"></image>
				<view @tap="changepass">修改密码</view>
			</view>
			<view class="dropItem">
				<image src="../../static/tabimg/tuichu.png" class="imgCode2"></image>
				<view @tap="close">退出应用</view>
			</view>
		</view>
		<!-- 主体 -->
		<view class="uni-tab-bar">
			<!-- 主体导航 -->
			<scroll-view class="uni-swiper-tab" @scroll="scroll" :scroll-left="scrollLeft">
				<view v-for="(item,index) in tabBars" :key="index" class="swiper-tab-list" :class="tabIndex==index ? 'active' : ''"
				 @tap="tapTab" :data-current="index">{{item.name}}</view>
			</scroll-view>
			<swiper class="swiper" :current="tabIndex" :duration="300" @change="changeTab" indicator-color="#C1C2C6"
			 indicator-active-color="#134199">
				<swiper-item class="Roughing">
					<swiper :indicator-dots="true" class="chanpin" indicator-color="#C1C2C6" indicator-active-color="#134199">
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">厚度统计:</view>
										<view class="bodyitem" v-for="(item,a) in thickness" :key="a" :class="(a%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" :title="title1" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="houdu.id" :chartType="houdu.chartType" :extraType="houdu.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="houdu.opts" :ref="houdu.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">宽度统计:</view>
										<view class="bodyitem" v-for="(item,i) in width" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="宽度曲线" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="kuandu.id" :chartType="kuandu.chartType" :extraType="kuandu.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="kuandu.opts" :ref="kuandu.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">终轧温度统计:</view>
										<view class="bodyitem" v-for="(item,i) in finish" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">卷取温度统计:</view>
										<view class="bodyitem" v-for="(item,i) in finish" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="终轧/卷取温度曲线" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="zhongzha.id" :chartType="zhongzha.chartType" :extraType="zhongzha.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="zhongzha.opts" :ref="zhongzha.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">凸度统计:</view>
										<view class="bodyitem" v-for="(item,i) in berlin" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="凸度统计" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="tudu.id" :chartType="tudu.chartType" :extraType="tudu.extraType" :cWidth="cWidth"
													 :cHeight="cHeight" :opts="tudu.opts" :ref="tudu.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">平坦度统计:</view>
										<view class="bodyitem" v-for="(item,i) in bankok" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="平坦度统计" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="pingtandu.id" :chartType="pingtandu.chartType" :extraType="pingtandu.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="pingtandu.opts" :ref="pingtandu.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">楔形统计:</view>
										<view class="bodyitem" v-for="(item,i) in boston" :key="i" :class="(i%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="楔形统计" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="qiexing.id" :chartType="qiexing.chartType" :extraType="qiexing.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="qiexing.opts" :ref="qiexing.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
				</swiper-item>
				<swiper-item class="Roughing">
					<swiper :indicator-dots="true" class="chanpin" indicator-color="#C1C2C6" indicator-active-color="#134199">
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">板坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in slab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">中间坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in midslab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">成品信息:</view>
										<view class="bodyitem" v-for="(item,id) in finishProd" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">道次设定:</view>
										<uni-collapse @change="change">
											<view v-for="(arr,i) in pass" :key="i">
												<uni-collapse-item :show-animation="true" :class="(i%2==0)?'' : 'addcol'" :animation="true" :title="arr.name"
												 :value="arr.id" :open="i===0?true:false">
													<view class="midbox">
														<view class="midbox-item" v-for="(item,index) in arr.data" :key="index">
															<view class="itemTitle">{{item.name}}</view>
															<view class="itemInfo">{{item.num}}</view>
														</view>
													</view>
												</uni-collapse-item>
											</view>
										</uni-collapse>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">道次实测:</view>
										<uni-collapse @change="change">
											<view v-for="(arr,i) in finalPass" :key="i">
												<uni-collapse-item :show-animation="true" :class="(i%2==0)?'' : 'addcol'" :animation="true" :title="arr.name"
												 :value="arr.id" :open="i===0?true:false">
													<view class="midbox">
														<view class="midbox-item" v-for="(item,index) in arr.data" :key="index">
															<view class="itemTitle">{{item.name}}</view>
															<view class="itemInfo">{{item.num}}</view>
														</view>
													</view>
												</uni-collapse-item>
											</view>
										</uni-collapse>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">工作辊:</view>
										<view class="bodyitem" v-for="(item,id) in roll1" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">工作辊:</view>
										<view class="bodyitem" v-for="(item,id) in roll2" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view class="parameterTitle">{{item.name}}</view>
											<view class="parameterNum">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">支撑辊:</view>
										<view class="bodyitem" v-for="(item,id) in brace" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view class="parameterTitle">{{item.name}}</view>
											<view class="parameterNum">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">立辊:</view>
										<view class="bodyitem" v-for="(item,id) in roller" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view class="parameterTitle">{{item.name}}</view>
											<view class="parameterNum">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">宽度实例:</view>
										<view class="bodyitem" v-for="(item,id) in widthexample" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">温度实例:</view>
										<view class="bodyitem" v-for="(item,id) in tem" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
				</swiper-item>
				<swiper-item class="Roughing">
					<swiper :indicator-dots="true" class="chanpin" indicator-color="#C1C2C6" indicator-active-color="#134199">
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">板坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in slab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">中间坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in midslab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">成品信息:</view>
										<view class="bodyitem" v-for="(item,id) in finishProd" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">设定数据:</view>
										<uni-collapse @change="change">
											<view v-for="(arr,i) in setData" :key="i">
												<uni-collapse-item :show-animation="true" :class="(i%2==0)?'' : 'addcol'" :animation="true" :title="arr.name"
												 :value="arr.id" :open="i===0?true:false">
													<view class="midbox">
														<view class="midbox-item" v-for="(item,index) in arr.data" :key="index">
															<view class="itemTitle">{{item.name}}</view>
															<view class="itemInfo">{{item.num}}</view>
														</view>
													</view>
												</uni-collapse-item>
											</view>
										</uni-collapse>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">实测数据:</view>
										<uni-collapse @change="change">
											<view v-for="(arr,i) in measuredata" :key="i">
												<uni-collapse-item :show-animation="true" :class="(i%2==0)?'' : 'addcol'" :animation="true" :title="arr.name"
												 :value="arr.id" :open="i===0?true:false">
													<view class="midbox">
														<view class="midbox-item" v-for="(item,index) in arr.data" :key="index">
															<view class="itemTitle">{{item.name}}</view>
															<view class="itemInfo">{{item.num}}</view>
														</view>
													</view>
												</uni-collapse-item>
											</view>
										</uni-collapse>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">轧辊数据:</view>
										<uni-collapse @change="change">
											<view v-for="(arr,i) in rollData" :key="i">
												<uni-collapse-item :show-animation="true" :animation="true" :class="(i%2==0)?'' : 'addcol'" :title="arr.name"
												 :value="arr.id" :open="i===0?true:false">
													<view class="midbox">
														<view class="midbox-item" v-for="(item,index) in arr.data" :key="index">
															<view class="itemTitle">{{item.name}}</view>
															<view class="itemInfo">{{item.num}}</view>
														</view>
													</view>
												</uni-collapse-item>
											</view>
										</uni-collapse>
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
				</swiper-item>
				<swiper-item class="Roughing">
					<swiper :indicator-dots="true" class="chanpin" indicator-color="#C1C2C6" indicator-active-color="#134199">
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle">板坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in slab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">中间坯信息:</view>
										<view class="bodyitem" v-for="(item,id) in midslab" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle">成品信息:</view>
										<view class="bodyitem" v-for="(item,id) in finishProd" :key="id" :class="(id%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle"></view>
										<view class="bodyitem" v-for="(item,z) in Ggundao" :key="z" :class="(z%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle"></view>
										<view class="bodyitem" v-for="(item,id1) in zhujuangun" :key="id1" :class="(id1%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem midtitle"></view>
										<view class="bodyitem" v-for="(item,z) in juantong" :key="z" :class="(z%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<view class="bodyitem midtitle"></view>
										<view class="bodyitem" v-for="(item,id1) in buleng" :key="id1" :class="(id1%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="prodbox">
								<view class="Roughingbox hide">
									<!-- 搜索框 -->
									<view class="search">
										<input type="text" v-model="searchinfo" class="searchinput" placeholder="钢卷号查询" />
										<view class="searchbox" @tap="search(searchinfo)">
											<image src="../../static/tabimg/search.png" class="searchimg"></image>
											<text class="searchtitle">搜索</text>
										</view>
									</view>
									<!-- 内容主体 -->
									<view class="product scroll-Y">
										<view class="bodyitem" v-for="(item,id3) in lengque" :key="id3" :class="(id3%2==0)?'' : 'addcol'">
											<view>{{item.name}}</view>
											<view class="titleinfo">{{item.num}}</view>
											<view class="titleunit">{{item.unit}}</view>
										</view>
										<!-- <uni-collapse @change="change">
											<uni-collapse-item :show-animation="true" :animation="true" open="true" title="卷取温度统计" :open="true">
												<view class="midbox">
													<uChart :show="canvas" :canvasId="juanqu.id" :chartType="juanqu.chartType" :extraType="juanqu.extraType"
													 :cWidth="cWidth" :cHeight="cHeight" :opts="juanqu.opts" :ref="juanqu.id" />
												</view>
											</uni-collapse-item>
										</uni-collapse> -->
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import {
		post
	} from '@/lib/Util.js';
	import uChart from '@/components/leiqch-ucharts/u-charts.vue';
	import uniCollapse from '@/components/uni-collapse/uni-collapse.vue';
	import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue';
	import uniIcon from "@/components/uni-icon/uni-icon.vue";
	import {
		mapState,
		mapMutations
	} from 'vuex';
	var _self;
	var canvaLineA = null;

	export default {
		components: {
			uniCollapse,
			uniCollapseItem,
			uniIcon,
			uChart
		},
		data() {
			return {
				flag: true,
				//试验曲线
				canvas: true,
				cWidth: '',
				cHeight: '',
				pixelRatio: 1,
				proID: '', // 项目id
				clickShow: false,
				searchinfo: '',
				title1: "厚度曲线",
				//厚度曲线
				houdu: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "houdu"
				},
				kuandu: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "kuandu"
				},
				zhongzha: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "zhongzha"
				},
				tudu: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "tudu"
				},
				pingtandu: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "pingtandu"
				},
				qiexing: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "qiexing"
				},
				juanqu: {
					opts: {},
					chartType: "line",
					extraType: " ",
					id: "juanqu"
				},
				//二级导航的data
				scrollLeft: 0,
				tabIndex: 0,
				isClickChange: false,
				tabBars: [{
					name: '产品质量',
					id: 1
				}, {
					name: '粗轧数据',
					id: 2
				}, {
					name: '精轧数据',
					id: 3
				}, {
					name: '卷取数据',
					id: 4
				}, ],
				//轧制计划
				//厚度统计
				thickness: [{
						name: '命中率',
						num: '---',
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						unit: '[mm]'
					}
				],
				//宽度统计
				width: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//终轧温度
				finish: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//卷取温度
				coiling: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//凸度统计
				berlin: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//平坦度统计
				bankok: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//楔形统计
				boston: [{
						name: '命中率',
						num: '---',
						id: 0,
						unit: '[%]'
					},
					{
						name: '平均值',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '公差值',
						num: '---',
						id: 2,
						unit: '[mm]'
					},
					{
						name: '最大值',
						num: '---',
						id: 3,
						unit: '[mm]'
					},
					{
						name: '设定值',
						num: '---',
						id: 4,
						unit: '[mm]'
					},
					{
						name: '最小值',
						num: '---',
						id: 5,
						unit: '[mm]'
					}
				],
				//板坯信息
				slab: [{
						name: '厚度',
						num: '---',
						id: 0,
						unit: '[mm]'
					},
					{
						name: '宽度',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '长度',
						num: '---',
						id: 2,
						unit: '[m]'
					},
					{
						name: '温度',
						num: '---',
						id: 3,
						unit: '[℃]'
					}
				],
				//中间坯信息
				midslab: [{
						name: '厚度',
						num: '---',
						id: 0,
						unit: '[mm]'
					},
					{
						name: '宽度',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '长度',
						num: '---',
						id: 2,
						unit: '[m]'
					},
					{
						name: '温度',
						num: '---',
						id: 3,
						unit: '[℃]'
					}
				],
				//成品信息
				finishProd: [{
						name: '厚度',
						num: '---',
						id: 0,
						unit: '[mm]'
					},
					{
						name: '宽度',
						num: '---',
						id: 1,
						unit: '[mm]'
					},
					{
						name: '长度',
						num: '---',
						id: 2,
						unit: '[m]'
					},
					{
						name: '温度',
						num: '---',
						id: 3,
						unit: '[℃]'
					}
				],
				//道次设定1
				pass: [],
				//道次设定2
				finalPass: [],
				//1#轧辊
				roll1: [{
						name: '上辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '上辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '零调压力',
						num: '---',
						unit: '/'
					},
					{
						name: '零调速度',
						num: '---',
						unit: '/'
					},
					{
						name: '零点位置',
						num: '---',
						unit: '/'
					}
				],
				roll2: [{
						name: '上辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '上辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '零调压力',
						num: '---',
						unit: '/'
					},
					{
						name: '零调速度',
						num: '---',
						unit: '/'
					},
					{
						name: '零点位置',
						num: '---',
						unit: '/'
					}
				],
				//工作辊
				brace: [{
						name: '上辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '上辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '下辊径',
						num: '---',
						unit: '/'
					}
				],
				roller: [{
						name: '转动侧辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '转动侧辊径',
						num: '---',
						unit: '/'
					},
					{
						name: '操作侧辊ID',
						num: '---',
						unit: '/'
					},
					{
						name: '操作侧辊径',
						num: '---',
						unit: '/'
					}
				],
				widthexample: [{
						name: '头部',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '中部',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '尾部',
						num: '---',
						unit: '[mm]'
					}
				],
				tem: [{
						name: '头部',
						num: '---',
						unit: '[℃]'
					},
					{
						name: '中部',
						num: '---',
						unit: '[℃]'
					},
					{
						name: '尾部',
						num: '---',
						unit: '[℃]'
					}
				],
				//设定数据
				setData: [],
				//实测数据
				measuredata: [],
				//轧辊数据
				rollData: [],
				//G辊道
				Ggundao: [{
						name: 'G辊道超前率',
						num: '---',
						unit: '[%]'
					},
					{
						name: 'G辊道滞后率',
						num: '---',
						unit: '[%]'
					},
					{
						name: '侧导板开口度',
						num: '---',
						unit: '[m]'
					},
					{
						name: '侧导板的压力',
						num: '---',
						unit: '[KN]'
					},
					{
						name: '夹送辊超前率',
						num: '---',
						unit: '[%]'
					},
					{
						name: '夹送辊开口度',
						num: '---',
						unit: '[m]'
					},
					{
						name: '夹送辊的压力',
						num: '---',
						unit: '[KN]'
					}
				],
				//助卷辊
				zhujuangun: [{
						name: '助卷辊超前率',
						num: '---',
						unit: '[%]'
					},
					{
						name: '助卷辊1开口度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '助卷辊2开口度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '助卷辊3开口度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '助卷辊1#压力',
						num: '---',
						unit: '[KM]'
					},
					{
						name: '助卷辊2#压力',
						num: '---',
						unit: '[KM]'
					},
					{
						name: '助卷辊3#压力',
						num: '---',
						unit: '[KN]'
					}
				],
				//卷筒juantong
				juantong: [{
						name: '卷筒超前率',
						num: '---',
						unit: '[%]'
					},
					{
						name: '卷筒的张力',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '带钢减速度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '带钢减速点',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '钢卷直径',
						num: '---',
						unit: '[KM]'
					},
					{
						name: '带钢全长',
						num: '---',
						unit: '[KM]'
					}
				],
				//头部不冷
				buleng: [{
						name: '头部不冷长度',
						num: '---',
						unit: '[%]'
					},
					{
						name: '尾部不冷长度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '头部微冷长度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '尾部微冷长度',
						num: '---',
						unit: '[mm]'
					},
					{
						name: '头部微冷温度',
						num: '---',
						unit: '[℃]'
					},
					{
						name: '尾部微冷温度',
						num: '---',
						unit: '[℃]'
					}
				],
				lengque: [{
						name: '冷却方向',
						num: '---',
						unit: ''
					},
					{
						name: '头尾冷却',
						num: '---',
						unit: ''
					},
					{
						name: '稀疏模式',
						num: '---',
						unit: ''
					},
					{
						name: '上级管组数',
						num: '---',
						unit: ''
					},
					{
						name: '下级管组数',
						num: '---',
						unit: ''
					}
				]
			}
		},
		computed: mapState(['forcedLogin', 'hasLogin', 'userName']),
		methods: {
			//导航栏关闭应用事件
			...mapMutations(['logout']),
			close() {
				let _self = this;
				uni.showModal({
					title: '退出登录',
					content: '确定要退出吗？',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							_self.logout();
							// #ifdef APP-PLUS  
							plus.runtime.quit();
							// #endif 
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			changepass() {
				uni.navigateTo({
					url: '/pages/changepass/changepass'
				})
			},
			//二级菜单的事件
			tapTab(e) {
				let tabIndex = e.target.dataset.current
				if (this.tabIndex === tabIndex) { //判断重复点击
					return false;
				} else {
					this.tabIndex = tabIndex;
					this.isClickChange = true;
				}
				console.log(tabIndex)
			},
			async changeTab(e) {
				let index = e.target.current;
				if (this.isClickChange) {
					this.tabIndex = index;
					this.isClickChange = false;
					return;
				}
				this.isClickChange = false;
				this.tabIndex = index; //一旦访问data就会出问题
			},
			details(val) {
				uni.navigateTo({
					url: '../roughdata/roughdata?id =' + val,
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			//下拉菜单的选择
			change() {
				console.log(111)
			},
			// 区域图曲线
			getServerData() {
				let LineA = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
						name: '厚度曲线',
						data: [-0.04, 0, 0.03, 0.07, 0.05, 0.03, 0.01],
					}]
				};
				this.houdu.opts = LineA
				let LineB = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
						name: '宽度曲线',
						data: [0, 10, 20, 30, 40, 40.1, 40.2],
					}]
				}
				this.kuandu.opts = LineB
				let LineC = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
							name: '终轧温度统计',
							data: [600, 610, 620, 630, 640, 640.1, 640.2],
						},
						{
							name: '卷取温度统计',
							data: [900, 910, 920, 930, 940, 940.1, 940.2],
						}
					]
				};
				this.zhongzha.opts = LineC;
				let LineD = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
						name: '凸度曲线',
						data: [0, 10, 20, 30, 40, 40.1, 40.2],
					}]
				};
				this.tudu.opts = LineD;
				let LineE = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
						name: '平坦度曲线',
						data: [0, 10, 0, 0.3, 0.04, 0.02, 0.2],
					}]
				};
				this.pingtandu.opts = LineE;
				let LineF = {
					categories: ['0', '80', '160', '240', '320', '400', '480', '560'],
					series: [{
						name: '楔形统计',
						data: [0, 10, 0, 0.3, 0.04, 0.02, 0.2],
					}]
				};
				this.qiexing.opts = LineF;
				let LineG = {
					categories: ['0', '100', '200', '300', '320', '400', '500', '600'],
					series: [{
						name: '卷取温度',
						data: [625, 650, 655, 635, 550, 500, 520],
					}]
				};
				this.juanqu.opts = LineG;
			},

			//厚度统计
			async getthickness(val) {
				let data1 = {}
				let data2 = {}
				if (this.flag) {
					data1 = {
						"db": "oracle",
						"sql": "select * from V_PRODUCT_TS WHERE MATID = '" + val + "'" 
					}
					data2 = {
						"db": "oracle",
						"sql": "select * from PCS_VIEW_QUALITY_TS WHERE COIL_NO = '" + val + "'"
					};
				} else {
					data1 = {
						"db": "oracle",
						"sql": "select * from V_PRODUCT_TS WHERE MATID = '" + val + "' and pro_id=" + this.proID
					}
					data2 = {
						"db": "oracle",
						"sql": "select * from PCS_VIEW_QUALITY_TS WHERE COIL_NO = '" + val + "' and pro_id=" + this.proID
					};
				}
				let res1 = await post('database/executeQuery', data1);
				let result1 = res1.data[0];
				let res2 = await post('database/executeQuery', data2);
				let result2 = res2.data[0];
				if (result1 == undefined && result2 == undefined) {
					for (let i = 0; i < this.thickness.length; i++) {
						this.thickness[i].num = "---"
						this.width[i].num = "---";
						this.finish[i].num = "---";
						this.coiling[i].num = "---";
						this.berlin[i].num = "---";
						this.bankok[i].num = "---";
						this.boston[i].num = "---";
					}
					return;
				}
				//厚度
				this.thickness[0].num = result1.THK_RAT;
				this.thickness[1].num = result2.THK_ACT;
				this.thickness[2].num = result2.THK_UP + "/" + result2.THK_LOW;
				this.thickness[3].num = result2.THK_MAX;
				this.thickness[4].num = result2.THK_TARGET;
				this.thickness[5].num = result2.THK_MIN;
				//宽度
				this.width[0].num = result1.WID_RAT;
				this.width[1].num = result2.WID_ACT;
				this.width[2].num = result2.WID_UP + "/" + result2.WID_LOW;
				this.width[3].num = result2.WID_MAX;
				this.width[4].num = result2.WID_TARGET;
				this.width[5].num = result2.WID_MIN;
				//终轧温度
				this.finish[0].num = result1.FDT_RAT;
				this.finish[1].num = result2.FDT_ACT;
				this.finish[2].num = result2.FDT_UP + "/" + result2.FDT_LOW;
				this.finish[3].num = result2.FDT_MAX;
				this.finish[4].num = result2.FDT_TARGET;
				this.finish[5].num = result2.FDT_MIN;
				//卷取温度
				this.coiling[0].num = result1.CT_RAT;
				this.coiling[1].num = result2.CT_ACT;
				this.coiling[2].num = result2.CT_UP + "/" + result2.CT_LOW;
				this.coiling[3].num = result2.CT_MAX;
				this.coiling[4].num = result2.CT_TARGET;
				this.coiling[5].num = result2.CT_MIN;
				//凸度统计
				this.berlin[0].num = result1.CROWN_RAT;
				this.berlin[1].num = result2.CR_ACT;
				this.berlin[2].num = result2.CR_UP + "/" + result2.CR_LOW;
				this.berlin[3].num = result2.CR_MAX;
				this.berlin[4].num = result2.CR_TARGET;
				this.berlin[5].num = result2.CR_MIN;
				//平坦度统计
				this.bankok[0].num = result1.FLATNESS_RAT;
				this.bankok[1].num = result2.FLATNESS_ACT;
				this.bankok[2].num = result2.FLATNESS_UP + "/" + result2.FLATNESS_LOW;
				this.bankok[3].num = result2.FLATNESS_MAX;
				this.bankok[4].num = result2.FLATNESS_TARGET;
				this.bankok[5].num = result2.FLATNESS_MIN;
				//楔形统计
				this.boston[0].num = result1.WEDGE_RAT;
				this.boston[1].num = result2.WEDGE_ACT;
				this.boston[2].num = result2.WEDGE_UP + "/" + result2.WEDGE_LOW;
				this.boston[3].num = result2.WEDGE_MAX;
				this.boston[4].num = result2.WEDGE_TARGET;
				this.boston[5].num = result2.WEDGE_MIN;
			},
			//粗轧数据
			async getRoughing(val) {
				let data1 = {}
				let data2 = {}
				let data3 = {}
				let data4 = {}
				if(this.flag){
					data1 = {
						sql: "select * from V_PRODUCT_TS WHERE MATID ='" + val + "'"};
					data2 = {sql: "select * from V_RM_SETUP_GEN_TS WHERE MATID = '" + val + "'"};
					data3 = {
						"db": "oracle",
						"sql": "select * from V_RM_PASS_TS WHERE MATID = '" + val + "'"
					};
					data4 = {
						"db": "oracle",
						"sql": "select * from V_RM_SCAN_TS WHERE MATID = '" + val + "'"
					};
				}else{
					data1 = {
						sql: "select * from V_PRODUCT_TS WHERE MATID ='" + val + "' and pro_id=" + this.proID};
					data2 = {
						sql: "select * from V_RM_SETUP_GEN_TS WHERE MATID = '" + val + "' and pro_id=" + this.proID};
					data3 = {
						"db": "oracle",
						"sql": "select * from V_RM_PASS_TS WHERE MATID = '" + val + "' and pro_id=" + this.proID
					};
					data4 = {
						"db": "oracle",
						"sql": "select * from V_RM_SCAN_TS WHERE MATID = '" + val + "' and pro_id=" + this.proID
					};
				}
				let res1 = await post('database/executeQuery', data1)
				let result1 = res1.data[0];
				
				let res2 = await post('database/executeQuery', data2)
				let result2 = res2.data[0];
				let pass = []
				let res3 = await post('database/executeQuery', data3)
				let finalPass = []
				let res4 = await post('database/executeQuery', data4)
				let result4 = res4.data[0]
				if (result1 != undefined) {
					//板坯信息slab
					this.slab[0].num = result1.SLABTHK;
					this.slab[1].num = result1.SLABWID;
					this.slab[2].num = result1.SLABLEN;
					this.slab[3].num = result1.SLABTEMP;
					//成品信息
					this.finishProd[0].num = result1.COIL_THICK;
					this.finishProd[1].num = result1.COIL_WIDTH;
					this.finishProd[2].num = result1.COIL_LENGTH2;
					this.finishProd[3].num = result1.CT;
					//中间坯信息
					this.midslab[0].num = result2.BARTRGTHK;
					this.midslab[1].num = result2.BARTRGWID;
					this.midslab[2].num = result2.BARTRGLEN;
					this.midslab[3].num = result2.BARTRGTEMP;
					//道次设定
					for (let i = 0; i < res3.data.length; i++) {
						pass.push({
							name: "道次:" + res3.data[i].STAND_NAME,
							data: [{
									name: '出口厚度',
									num: res3.data[i].EXITTHK,
								},
								{
									name: '出口宽度',
									num: res3.data[i].EXITWID,
								},
								{
									name: '出口长度',
									num: res3.data[i].EXITLEN,
								},
								{
									name: '出口温度',
									num: res3.data[i].EXITTEMP,
								},
								{
									name: 'R1轧辊',
									num: res3.data[i].R1GAP,
								},
								{
									name: '压下量',
									num: res3.data[i].R1LOAD,
								},
								{
									name: '咬入速度',
									num: res3.data[i].R1HEADINSPEED,
								},
								{
									name: '运行速度',
									num: res3.data[i].R1ROLLSPEED,
								},
								{
									name: '抛出速度',
									num: res3.data[i].R1TAILOUTSPEED,
								},
								{
									name: '轧制力',
									num: res3.data[i].R1FORCE,
								},
								{
									name: '入口侧导',
									num: res3.data[i].R1ENTRYSIDEGUIDE,
								},
								{
									name: '出口侧导',
									num: res3.data[i].R1DELIVSIDEGUIDE,
								},
								{
									name: 'E1辊缝',
									num: res3.data[i].E1GAP,
								},
								{
									name: 'E1轧制力',
									num: res3.data[i].E1FORCE,
								}
							]
						})
					}
					this.pass = pass;
					//道次实测2
					for (let i = 0; i < res4.data.length; i++) {
						finalPass.push({
							name: "道次:" + res4.data[i].PASS,
							data: [{
									name: '咬钢时间',
									num: res4.data[i].TIME_R1ON,
								},
								{
									name: '抛钢时间',
									num: res4.data[i].TIME_R1OFF,
								},
								{
									name: '头部辊缝',
									num: res4.data[i].SCANR1GAP_HEAD,
								},
								{
									name: '中部辊缝',
									num: res4.data[i].SCANR1GAP_BODY,
								},
								{
									name: '尾部辊缝',
									num: res4.data[i].SCANR1GAP_TAIL,
								},
								{
									name: '头部轧制力',
									num: res4.data[i].SCANR1FORCE_HEAD,
								},
								{
									name: '中部轧制力',
									num: res4.data[i].SCANR1FORCE_BODY,
								},
								{
									name: '尾部轧制力',
									num: res4.data[i].SCANR1FORCE_TAIL,
								},
								{
									name: '头部速度',
									num: res4.data[i].SCANR1SPEED_HEAD,
								},
								{
									name: '中部速度',
									num: res4.data[i].SCANR1SPEED_BODY,
								},
								{
									name: '尾部速度',
									num: res4.data[i].SCANR1SPEED_TAIL,
								},
								{
									name: '头部电流',
									num: res4.data[i].SCANR1CURRENT_HEAD,
								},
								{
									name: '中部电流',
									num: res4.data[i].SCANR1CURRENT_BODY,
								},
								{
									name: '尾部电流',
									num: res4.data[i].SCANR1CURRENT_TAIL,
								},
								{
									name: 'E1头部轧制力',
									num: res4.data[i].SCANE1FORCE_HEAD,
								},
								{
									name: 'E1中部轧制力',
									num: res4.data[i].SCANE1FORCE_BODY,
								},
								{
									name: 'E1尾部轧制力',
									num: res4.data[i].SCANE1FORCE_TAIL,
								}
							]
						})
					}
					this.finalPass = finalPass;
					//1#轧辊roll1
					this.roll1[0].num = result2.R1UWR_ID;
					this.roll1[1].num = result2.R1UWR_DIA;
					this.roll1[2].num = result2.R1LWR_ID;
					this.roll1[3].num = result2.R1LWR_DIA;
					this.roll1[4].num = result2.R1WR_ZEROF;
					this.roll1[5].num = result2.R1WR_ZEROS;
					this.roll1[6].num = result2.R1LWR_ZEROPT;
					//2#轧辊
					this.roll2[0].num = result2.R2UWR_ID;
					this.roll2[1].num = result2.R2UWR_DIA;
					this.roll2[2].num = result2.R2LWR_ID;
					this.roll2[3].num = result2.R2LWR_DIA;
					this.roll2[4].num = result2.R2WR_ZEROF;
					this.roll2[5].num = result2.R2WR_ZEROS;
					this.roll2[6].num = result2.R2LWR_ZEROPT;
					//支撑辊brace
					this.brace[0].num = result2.E2UBR_ID;
					this.brace[1].num = result2.E2UBR_DIA;
					this.brace[2].num = result2.E2LBR_ID;
					this.brace[3].num = result2.E2LBR_DIA;
					//立辊roller
					this.roller[0].num = result2.E2DER_ID;
					this.roller[1].num = result2.E2DER_DIA;
					this.roller[2].num = result2.E2OER_ID;
					this.roller[3].num = result2.E2OER_DIA;
					//宽度实例widthexample
					this.widthexample[0].num = result4.WIDGAGE_HEAD;
					this.widthexample[1].num = result4.WIDGAGE_BODY;
					this.widthexample[2].num = result4.WIDGAGE_TAIL;
					this.tem[0].num = result4.SCANRDT_HEAD;
					this.tem[1].num = result4.SCANRDT_BODY;
					this.tem[2].num = result4.SCANRDT_TAIL;
				} else {
					for (let i = 0; i < this.slab.length; i++) {
						this.slab[i].num = '---';
						this.finishProd[i].num = '---';
						this.midslab[i].num = '---';
						this.pass = [];
						this.finalPass = [];
						this.brace[i].num = '---';
						this.roller[i].num = '---';
					}
					for (let j = 0; j < this.roll1.length; j++) {
						this.roll1[j].num = '---';
						this.roll2[j].num = '---';
					}
					for (let a = 0; a < this.widthexample.length; a++) {
						this.widthexample[a].num = '---'
						this.tem[a].num = '---'
					}
				}
			},
			//精轧数据
			async getFinishdata(val) {
				let setData = [];
				let measuredata = [];
				let rollData = [];
				let data1 = {};
				if(this.flag){
					data1 = {
						sql: "select * from V_FM_PASS_TS WHERE COIL_NO = '" + val + "'"
					};
				}else{
					data1 = {
						sql: "select * from V_FM_PASS_TS WHERE COIL_NO = '" + val + "' and pro_id=" + this.proID
					};
				}
				let res1 = await post('database/executeQuery', data1);
				for (let i = 0; i < res1.data.length; i++) {
					setData.push({
						name: "机架号:" + res1.data[i].STAND_NAME,
						data: [{
								name: '出口厚度',
								num: res1.data[i].EXIT_THK,
							},
							{
								name: '出口宽度',
								num: res1.data[i].EXIT_WID,
							},
							{
								name: '压下率',
								num: res1.data[i].REPS,
							},
							{
								name: '压下量',
								num: res1.data[i].LOAD,
							},
							{
								name: '轧制温度',
								num: res1.data[i].ROLLTEMP,
							},
							{
								name: '轧机辊缝',
								num: res1.data[i].GAP,
							},
							{
								name: '穿带速度',
								num: res1.data[i].THREADSPD,
							},
							{
								name: '轧制力',
								num: res1.data[i].FORCE,
							},
							{
								name: '窜辊量',
								num: res1.data[i].SFT,
							},
							{
								name: '弯辊力',
								num: res1.data[i].BENDFORCE,
							},
							{
								name: '轧制力矩',
								num: res1.data[i].TORQUE,
							},
							{
								name: '轧制功率',
								num: res1.data[i].POWER,
							},
							{
								name: '入口侧导',
								num: res1.data[i].SIDE_GUIDE,
							},
							{
								name: '活套张力',
								num: res1.data[i].LOOP_TEN,
							}
						]
					})
					measuredata.push({
						name: "机架号:" + res1.data[i].STAND_NAME,
						data: [{
								name: '咬入时刻',
								num: res1.data[i].ON_TIME,
							},
							{
								name: '抛出时刻',
								num: res1.data[i].OFF_TIME,
							},
							{
								name: '头部辊缝',
								num: res1.data[i].GAP_HEAD,
							},
							{
								name: '中部辊缝',
								num: res1.data[i].GAP_BODY,
							},
							{
								name: '尾部辊缝',
								num: res1.data[i].GAP_TAIL,
							},
							{
								name: '实测速度',
								num: res1.data[i].ROLL_SPEED_HEAD,
							},
							{
								name: '实测轧制力',
								num: res1.data[i].FORCE_HEAD,
							},
							{
								name: '实测窜辊量',
								num: res1.data[i].SFT_HEAD,
							},
							{
								name: '实测弯辊量',
								num: res1.data[i].BENDFORCE_HEAD,
							},
							{
								name: '实测电流',
								num: res1.data[i].CURRENT_HEAD,
							}
						]
					})
					rollData.push({
						name: "机架号:" + res1.data[i].STAND_NAME,
						data: [{
								name: '上支辊ID',
								num: res1.data[i].UBR_ID,
							},
							{
								name: '上支辊径',
								num: res1.data[i].UBR_DIA,
							},
							{
								name: '下支辊ID',
								num: res1.data[i].LBR_ID,
							},
							{
								name: '下支辊径',
								num: res1.data[i].LBR_DIA,
							},
							{
								name: '上工辊ID',
								num: res1.data[i].UWR_ID,
							},
							{
								name: '上工辊径',
								num: res1.data[i].UWR_DIA,
							},
							{
								name: '下工辊ID',
								num: res1.data[i].LWR_ID,
							},
							{
								name: '下工辊径',
								num: res1.data[i].LWR_DIA,
							},
							{
								name: '零调压力',
								num: res1.data[i].WR_ZEROF,
							},
							{
								name: '零调速度',
								num: res1.data[i].WR_ZEROS,
							},
							{
								name: '零点位置',
								num: res1.data[i].WR_ZEROPT,
							}
						]
					})
				}
				this.setData = setData;
				this.measuredata = measuredata;
				this.rollData = rollData;
				//实测数据

			},
			//卷取数据
			async getjuanqu(val) {
				let searchinfo = this.searchinfo
				let data1 = {};
				//不冷
				let data2 = {}
				if(this.flag){
					data1 = {
						"db": "oracle",
						"sql": "select * from V_DC_SETUP_TS WHERE COIL_NO = '" + val + "'"
					};
					//不冷
					data2 = {
						"db": "oracle",
						"sql": "select * from TB_CTC_SETUP WHERE COIL_NO = '" + val + "'"
					};
				}else{
					data1 = {
						"db": "oracle",
						"sql": "select * from V_DC_SETUP_TS WHERE COIL_NO = '" + val + "' and pro_id=" + this.proID
					};
					//不冷
					data2 = {
						"db": "oracle",
						"sql": "select * from TB_CTC_SETUP WHERE COIL_NO = '" + val + "' and pro_id=" + this.proID
					};
				}
				let res1 = await post('database/executeQuery', data1);
				let result = res1.data[0];
				if (result != undefined) {
					//G辊道
					this.Ggundao[0].num = result.GLEAD;
					this.Ggundao[1].num = result.GLAG;
					this.Ggundao[2].num = result.SGOPEN;
					this.Ggundao[3].num = result.SGPRESS;
					this.Ggundao[4].num = result.PRLEAD;
					this.Ggundao[5].num = result.PROPEN;
					this.Ggundao[6].num = result.PRPRESS;
					//助卷辊
					this.zhujuangun[0].num = result.WRLEAD;
					this.zhujuangun[1].num = result.WR1OPEN;
					this.zhujuangun[2].num = result.WR2OPEN;
					this.zhujuangun[3].num = result.WR3OPEN;
					this.zhujuangun[4].num = result.WR1PRESS;
					this.zhujuangun[5].num = result.WR2PRESS;
					this.zhujuangun[6].num = result.WR3PRESS;
					//卷筒
					this.juantong[0].num = result.MDLEAD;
					this.juantong[1].num = result.MDTENS;
					this.juantong[2].num = result.DESSPEED;
					this.juantong[3].num = result.DESDOT;
					this.juantong[4].num = result.COILDIA;
					this.juantong[5].num = result.COILTOTLNG;
				} else {
					for (let i = 0; i < this.zhujuangun.length; i++) {
						this.Ggundao[i].num = '---';
						this.zhujuangun[i].num = '---';
					}
					for (let z = 0; z < this.juantong.length; z++) {
						this.juantong[z].num = '---';
					}
				}
				
				let res2 = await post('database/executeQuery', data2);
				let result2 = res2.data[0];
				if (result2 != undefined) {
					this.buleng[0].num = result2.HUNCOOLLEN;
					this.buleng[1].num = result2.TUNCOOLLEN;
					this.buleng[2].num = result2.HMICROCOOLLEN;
					this.buleng[3].num = result2.TMICROCOOLLEN;
					this.buleng[4].num = result2.HMICROCOOLTEMP;
					this.buleng[5].num = result2.TMICROCOOLTEMP;
					//冷却表
					if (result2.COOLDIRECT === 1) {
						this.lengque[0].num = "向前"
					}
					if (result2.COOLDIRECT === 2) {
						this.lengque[0].num = "向后"
					}

					if (result2.HEADTAILPRO === 1) {
						this.lengque[1].num = "全长冷却"
					}
					if (result2.HEADTAILPRO === 2) {
						this.lengque[1].num = "头部不冷"
					}
					if (result2.HEADTAILPRO === 3) {
						this.lengque[1].num = "尾部不冷"
					}
					if (result2.HEADTAILPRO === 4) {
						this.lengque[1].num = "头尾不冷"
					}
					if (result2.HEADTAILPRO === 5) {
						this.lengque[1].num = "头部微冷"
					}
					if (result2.HEADTAILPRO === 6) {
						this.lengque[1].num = "尾部微冷"
					}
					if (result2.HEADTAILPRO === 7) {
						this.lengque[1].num = "头尾微冷"
					}
					if (result2.VALVEPATTERN === 1) {
						this.lengque[2].num = "1/4模式"
					}
					if (result2.VALVEPATTERN === 2) {
						this.lengque[2].num = "2/4模式"
					}
					if (result2.VALVEPATTERN === 3) {
						this.lengque[2].num = "3/4模式"
					}
					if (result2.VALVEPATTERN === 4) {
						this.lengque[2].num = "4/4模式"
					}
					this.lengque[3].num = result2.VALVENUMUP;
					this.lengque[4].num = result2.VALVENUMDN;
				} else {
					for (let j = 0; j < this.buleng.length; j++) {
						this.buleng[j].num = '---';
					}
					for (let a = 0; a < this.lengque.length; a++) {
						this.lengque[a].num = '---';
					}
				}

			},
			//搜索 
			async search(val) {
				let str = val.replace(/\s*/g, "");
				let that = this;
				if (str) {
					uni.showToast({
						icon: 'loading',
						title: "加载中",
						success() {
							//产品质量
							that.getthickness(str)
							//粗轧数据
							that.getRoughing(str)
							//精轧数据
							that.getFinishdata(str)
							//卷取数据
							that.getjuanqu(str)
						}
					})
				}
			}
		},

		onLoad(val) {
			this.proID = uni.getStorageSync('proid')
			// if (!this.proID) {
			// 	uni.showToast({
			// 		icon: 'none',
			// 		title: '请选择相对应的项目',
			// 		success() {
			// 			uni.switchTab({
			// 				url: '/pages/main/main'
			// 			})
			// 		}
			// 	})
			// }
			if (val.id) {
				this.searchinfo = val.id
				//产品质量
				this.getthickness(val.id)
				//粗轧数据
				this.getRoughing(val.id)
				//精轧数据
				this.getFinishdata(val.id)
				//卷取数据
				this.getjuanqu(val.id)
			}
			_self = this;
			this.cWidth = uni.upx2px(730);
			this.cHeight = uni.upx2px(500);
			this.getServerData();

			if (!uni.getStorageSync('hasLogin')) {
				uni.showModal({
					title: '未登录',
					content: '您未登录，需要登录后才能继续',
					showCancel: !this.forcedLogin,
					success: (res) => {
						if (res.confirm) {
							if (this.forcedLogin) {
								uni.reLaunch({
									url: '../login/login'
								});
							} else {
								uni.navigateTo({
									url: '../login/login'
								});
							}
						}
					}
				});
			}
		},

		watch: {
			hasLogin() {
				if (!this.$store.state.hasLogin) {
					uni.reLaunch({
						url: '../login/login',
					});
				}
			}
		},
		onNavigationBarButtonTap(e) {
			if (e.float == "right") {
				this.clickShow = !this.clickShow;
			}
		}
	}
</script>


<style>
	/* 下面主体的高度 */
	.main {
		height: calc(1334rpx - 380rpx);
		padding: 26rpx;
		box-sizing: border-box;
		overflow: hidden;
	}

	/* 二级列表样式 */
	.prodtab {
		width: 248rpx;
		height: 94rpx;
	}

	.hide {
		overflow: hidden;
	}

	/* 搜索框 */
	.search {
		width: 640rpx;
		height: 70rpx;
		display: flex;
		padding: 0 30rpx;
		box-sizing: border-box;
		border-radius: 35rpx;
		background: #FFFFFF;
		margin: 24rpx auto 20rpx;
		border: 1rpx solid #FFFFFF;
	}

	.searchimg {
		width: 33rpx;
		height: 33rpx;
	}

	.searchinput {
		width: 100%;
		height: 100%;
		line-height: 70rpx;
		font-size: 24rpx;
		color: #505153;
		font-family: PingFangSC-Regular, sans-serif;
	}

	.searchbox {
		width: 110rpx;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		overflow: hidden;
	}

	.searchtitle {
		font-size: 24rpx;
		color: #505153;
		letter-spacing: 25;
		line-height: 70rpx;
		font-family: PingFangSC-Regular, sans-serif;
	}

	.prodbox {
		height: 100%;
		width: 100%;
	}

	.chanpin {
		height: 100%;
	}

	/* 产品质量搜索框一下 */
	.product {
		height: calc(100% - 67rpx - 114rpx);
		border-top: 2rpx solid #C1C2C6;
	}

	/* 扎号 */
	.prodnumber {
		width: 100%;
		height: 70rpx;
		display: flex;
		justify-content: space-between;
		padding: 0 30rpx;
		box-sizing: border-box;
		background: #e6e6e6;
	}

	.prodnumber-item {
		display: flex;
		line-height: 70rpx;
		font-size: 24rpx;
		color: #000000;
	}

	.mg20 {
		margin-left: 20rpx;
		color: #134197;
	}

	.mr20 {
		margin-right: 20upx;
	}

	.clickbtn {
		line-height: 70upx;
		height: 70upx;
		font-size: 24upx;
		color: #505153;
		font-family: PingFangSC-Semibold, sans-serif;
	}

	.clickcolor {
		color: #134199;
	}

	.charts {
		width: 730upx;
		height: 500upx;
		background-color: #FFFFFF;
	}
</style>
